package com.lbh.model;

import java.util.Date;
import java.util.List;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Record;

/**
 * @author Only user用户表
 */
public class UserModel extends Model<UserModel> {

	private static final long serialVersionUID = 1L;

	public static final UserModel DAO = new UserModel();

	public static final String ID = "id";
	public static final String ACCOUNT = "account";
	public static final String PASSWORD = "password";
	public static final String NICKNAME = "nickName";
	public static final String GENDER = "gender";
	public static final String HEADIMGURL = "headimgUrl";
	public static final String HANFEN = "hanfen";
	public static final String EXPERIENCE = "experience";
	public static final String BINDEMAIL = "bindEmail";
	public static final String BINDPHONE = "bindPhone";
	public static final String PROVINCEID = "provinceId";
	public static final String CITYID = "cityId";
	public static final String INTRO = "intro";
	public static final String SALT = "salt";
	public static final String USERTYPE = "userType";
	public static final String HUANXINID = "huanxinId";
	public static final String HUANXINPWD = "huanxinPwd";
	public static final String QQTOKEN = "qqToken";
	public static final String QQOPENID = "qqOpenid";
	public static final String WXTOKEN = "wxToken";
	public static final String WXOPENID = "wxOpenid";
	public static final String WXUNIONID = "wxUnionid";
	public static final String XINLANGTOKEN = "xinlangToken";
	public static final String XINLANGUID = "xinlangUId";
	public static final String REGISTERDATE = "registerDate";
	public static final String LOGINTIME = "loginTime";
	public static final String BIRTHDAY = "birthday";
	public static final String AGEID = "ageId";
	public static final String WANTPRO = "wantPro";
	public static final String FINISHPRO = "finishPro";
	public static final String ABLEPERSON = "ablePerson";
	public static final String ACTIVE = "active";
	public static final String WXNAME = "wxName";
	public static final String WXACCOUNT = "wxAccount";

	public Long getId() {
		return this.getLong(ID);
	}

	public void setId(Long id) {
		this.set(ID, id);
	}

	public String getAccount() {
		return this.getStr(ACCOUNT);
	}

	public void setAccount(String account) {
		this.set(ACCOUNT, account);
	}

	public String getPassword() {
		return this.getStr(PASSWORD);
	}

	public void setPassword(String password) {
		this.set(PASSWORD, password);
	}

	public String getNickName() {
		return this.getStr(NICKNAME);
	}

	public void setNickName(String nickName) {
		this.set(NICKNAME, nickName);
	}

	public Integer getGender() {
		return this.getInt(GENDER);
	}

	public void setGender(Integer gender) {
		this.set(GENDER, gender);
	}

	public String getHeadimgUrl() {
		return this.getStr(HEADIMGURL);
	}

	public void setHeadimgUrl(String headimgUrl) {
		this.set(HEADIMGURL, headimgUrl);
	}

	public Integer getHanfen() {
		return this.getInt(HANFEN);
	}

	public void setHanfen(Integer hanfen) {
		this.set(HANFEN, hanfen);
	}

	public Integer getExperience() {
		return this.getInt(EXPERIENCE);
	}

	public void setExperience(Integer experience) {
		this.set(EXPERIENCE, experience);
	}

	public String getBindEmail() {
		return this.getStr(BINDEMAIL);
	}

	public void setBindEmail(String bindEmail) {
		this.set(BINDEMAIL, bindEmail);
	}

	public String getBindPhone() {
		return this.getStr(BINDPHONE);
	}

	public void setBindPhonel(String bindPhone) {
		this.set(BINDPHONE, bindPhone);
	}

	public Integer getProvinceId() {
		return this.getInt(PROVINCEID);
	}

	public void setProvinceId(Integer provinceId) {
		this.set(PROVINCEID, provinceId);
	}

	public Integer getCityId() {
		return this.getInt(CITYID);
	}

	public void setCityId(Integer cityId) {
		this.set(CITYID, cityId);
	}

	public String getIntro() {
		return this.getStr(INTRO);
	}

	public void setIntro(String intro) {
		this.set(INTRO, intro);
	}

	public String getSalt() {
		return this.getStr(SALT);
	}

	public void setSalt(String salt) {
		this.set(SALT, salt);
	}

	public Integer getUserType() {
		return this.getInt(USERTYPE);
	}

	public void setUserType(Integer userType) {
		this.set(USERTYPE, userType);
	}

	public String getHuanxinId() {
		return this.getStr(HUANXINID);
	}

	public void setHuanxinId(String huanxinId) {
		this.set(HUANXINID, huanxinId);
	}

	public String getHuanxinPwd() {
		return this.getStr(HUANXINPWD);
	}

	public void setHuanxinPwd(String huanxinPwd) {
		this.set(HUANXINPWD, huanxinPwd);
	}

	public String getQqToken() {
		return this.getStr(QQTOKEN);
	}

	public void setQqToken(String qqToken) {
		this.set(QQTOKEN, qqToken);
	}

	public String getQqOpenid() {
		return this.getStr(QQOPENID);
	}

	public void setQqOpenid(String qqOpenid) {
		this.set(QQOPENID, qqOpenid);
	}

	public String getWxToken() {
		return this.getStr(WXTOKEN);
	}

	public void setWxToken(String wxToken) {
		this.set(WXTOKEN, wxToken);
	}

	public String getWxOpenid() {
		return this.getStr(WXOPENID);
	}

	public void setWxOpenid(String wxOpenid) {
		this.set(WXOPENID, wxOpenid);
	}

	public String getWxUnionid() {
		return this.getStr(WXUNIONID);
	}

	public void setWxUnionid(String wxUnionid) {
		this.set(WXUNIONID, wxUnionid);
	}

	public String getXinlangToken() {
		return this.getStr(XINLANGTOKEN);
	}

	public void setXinlangToken(Object xinlangToken) {
		this.set(XINLANGTOKEN, xinlangToken);
	}

	public String getXinlangUId() {
		return this.getStr(XINLANGUID);
	}

	public void setXinlangUId(Object xinlangUId) {
		this.set(XINLANGUID, xinlangUId);
	}

	public Integer getRegisterDate() {
		return this.getInt(REGISTERDATE);
	}

	public void setRegisterDate(Object registerDate) {
		this.set(REGISTERDATE, registerDate);
	}

	public Date getLoginTime() {
		return this.getDate(LOGINTIME);
	}

	public void setLoginTime(Date loginTime) {
		this.set(LOGINTIME, loginTime);
	}

	public String getBirthday() {
		return this.getStr(BIRTHDAY);
	}

	public void setBirthday(String birthday) {
		this.set(BIRTHDAY, birthday);
	}

	public Integer getAgeId() {
		return this.getInt(AGEID);
	}

	public void setAgeId(Integer ageId) {
		this.set(AGEID, ageId);
	}

	public String getWantPro() {
		return this.getStr(WANTPRO);
	}

	public void setWantPro(String wantPro) {
		this.set(WANTPRO, wantPro);
	}

	public String getFinishPro() {
		return this.getStr(FINISHPRO);
	}

	public void setFinishPro(String finishPro) {
		this.set(FINISHPRO, finishPro);
	}

	public Integer getAblePerson() {
		return this.getInt(ABLEPERSON);
	}

	public void setAblePerson(Integer ablePerson) {
		this.set(ABLEPERSON, ablePerson);
	}

	public Integer getActive() {
		return this.getInt(ACTIVE);
	}

	public void setActive(Integer active) {
		this.set(ACTIVE, active);
	}

	public String getWxName() {
		return this.getStr(WXNAME);
	}

	public void setWxName(String wxName) {
		this.set(WXNAME, wxName);
	}

	public String getWxAccount() {
		return this.getStr(WXACCOUNT);
	}

	public void setWxAccount(String wxAccount) {
		this.set(WXACCOUNT, wxAccount);
	}

	/**
	 * 查询所有
	 * 
	 * @return
	 */
	public List<UserModel> getAll() {
		String sql = "select * from user limit 10";
		return this.find(sql);
	}
	
	public List<Record> getAlls() {
		String sql = "select * from user limit 10";
		return Db.find(sql);
	}
}
